import { default as request, cloud } from '@/framework/utils/request'
export default ({
  summary(id) {
    return request({
      url: cloud.dqbasic + '/question/summary',
      method: 'get',
      params: {
        syllabusId: id
      }
    })
  },
  fetchPage(params) {
    return request({
      url: cloud.dqbasic + '/question/page',
      method: 'get',
      params
    })
  },
  add(data) {
    return request({
      url: cloud.dqbasic + '/question/add',
      method: 'post',
      data
    })
  },
  detail(id) {
    return request({
      url: cloud.dqbasic + '/question/detail',
      method: 'get',
      params: {
        id
      }
    })
  },
  delete(syllabusId, idList) {
    return request({
      url: cloud.dqbasic + '/question/delete',
      method: 'post',
      data: {
        syllabusId,
        idList
      }
    })
  },
  changeStatus(id, status) {
    return request({
      url: cloud.dqbasic + '/question/changeStatus',
      method: 'post',
      data: {
        id,
        status
      }
    })
  },
  excelExport(id) {
    return request({
      url: cloud.dqbasic + '/question/excelExport',
      method: 'post',
      responseType: 'blob',
      data: {
        id
      }
    })
  }

})
